<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>收货地址</title>
    <div data-th-replace="layout/head"></div>
</head>
<body>
<!-- top bar -->
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-left goBack" onclick="goBack();">
            <span class="iconfont icon-fanhui"></span>
        </a>
        <a class="button button-link button-nav pull-right" th:href="@{/mobile/uc/userInfo/addUserAddress}">
            添加
        </a>
        <h1 class='title title-white'>收货地址</h1>
    </header>
<!-- top bar end-->

    <div class="content order-content">
        <section class="no-data__wrap" th:if="${#lists.isEmpty(address)}">
            <em>&nbsp;</em>
            <p>还没有收货地址，快去添加吧~~~</p>
        </section>
        <th:block th:if="!${#lists.isEmpty(address)}" th:each="entity,index:${address}">
            <div class="card choose">
                <div class="card-header">
                    <span  th:text="${entity['receiver']}"></span>
                    <span  th:text="${entity['mobile']}" ></span>
                </div>
                <div class="card-content">
                    <div class="card-content-inner" th:text="((${entity['province']}!=null?${entity['province']['areaName']}:'') +''+(${entity['city']}!=null?${entity['city']['areaName']}:'')+''+(${entity['town']}!=null?${entity['town']['areaName']}:''))+${entity['address']}"></div>
                </div>
                <div class="card-footer">
                    <asdie>
                        <label class="label-switch">
                            <input class="checkbox-status" th:attrappend="data-index=${index.count},data-id=${entity['id']}"   type="checkbox" name="status" th:checked="${entity['status']}==1">
                            <div class="checkbox"></div>
                        </label>
                    </asdie>
                    <asdie>
                        <span class="editor" th:attrappend="data-id=${entity['id']}"><i class="icon iconfont icon-bianji fs6 vam "  ></i> <span class="fs6 vam">编辑</span></span>
                        <span class="ml5 delete" th:attrappend="data-id=${entity['id']}"><i class="icon iconfont icon-shanchu fs6 vam" ></i> <span class="fs6 vam">删除</span></span>
                    </asdie>
                </div>
            </div>
        </th:block>
    </div>
</div>
<div data-th-replace="layout/footer"></div>
<script type="text/javascript" th:src="@{{path}/front/mobile/business/user/center/userInfo/u-update-address.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>